<h1 class="title">Task list</h1>

<table class="tabular">
 <tr class="header">
  <th>Subject</th>
  <th>Project</th>
  <th>Iteration</th>
 </tr> 
<% odd = 1 %>
<% for task in @tasks %>
 <tr <% if odd == 1 %>class="odd_row"<% odd = 0 %><% else %>class="even_row"<% odd = 1 %><% end %>>
   <td><%= link_to task.subject, { :controller => "task", :action => "show", :id => task.task_id }  %></td>
   <td><%= link_to task.project.name, {:controller => "project", :action => "show", :id => task.project_fk} %></td>
   <td><% iteration_name = task.get_iteration_name %><% if iteration_name %><%= link_to iteration_name, {:controller => "iteration", :action => "show", :id => task.iteration_fk} %><% end %></td>
 </tr> 
<% end %>
</table>
